package com.qidian.mes.device.controller;

import com.qidian.common.pojo.MESResult;
import com.qidian.mes.device.service.ScmiService;
import com.qidian.mes.pojo.Scmi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 刘泽磊
 * @Company 起点编程
 * @Description
 * @Time 2024/10/18 14:04
 */
@RestController
@RequestMapping("/scmi")
@CrossOrigin
public class ScmiController {
    @Autowired
    private ScmiService scmiService;
    @GetMapping("/list")
    public MESResult select(Scmi scmi){
        return scmiService.select(scmi);
    }
    @PostMapping("/insert")
    public MESResult insert(@RequestBody Scmi scmi){
        return scmiService.insert(scmi);
    }
    @PutMapping("/update")
    public MESResult update(@RequestBody Scmi scmi){
        return scmiService.update(scmi);
    }
    @GetMapping("/selectById")
    public MESResult selectById(Long scmiId){
        return scmiService.selectById(scmiId);
    }
    @DeleteMapping("/delete")
    public MESResult delete(Long scmiId){
        return scmiService.delete(scmiId);
    }
}
